package com.wxmit.ot.gen.service;

import com.wxmit.ot.base.core.OtBaseServiceImpl;
import com.wxmit.ot.gen.domain.GenTableColumn;
import com.wxmit.ot.gen.mapper.GenTableColumnMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * GenGroupTableColumnService
 *
 * @author huangxiong
 * @version V1.0
 * @date 2023/2/22 10:44
 */
@Service
@RequiredArgsConstructor
public class GenTableColumnService extends OtBaseServiceImpl<GenTableColumnMapper, GenTableColumn> {

    public List<GenTableColumn> getByTableId(Long tableId) {
        return baseMapper.selectList(getLambdaQuery().in(GenTableColumn::getTableId,tableId));
    }

    public boolean removeByTableIds(Collection<?> list) {
        return remove(getLambdaQuery().in(GenTableColumn::getTableId,list));
    }
}
